//
//  LianShiViewController.m
//  KVO和链式编程
//
//  Created by dihuijun on 17/4/13.
//  Copyright © 2017年 Cycle. All rights reserved.
//

#import "LianShiViewController.h"
#import "NSObject+calulate.h"
@interface LianShiViewController ()

@end

@implementation LianShiViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"链式编程,看打印";
    self.view.backgroundColor = [UIColor whiteColor];
    
    
    ///使用方法
    double result = [NSObject Cycle_MakeCalulate:^(CalulateManager *manager) {
        manager.add(44.99).add(222).sub(100.8).mult(10).divs(10);
    }];
    NSLog(@"%.3f",result);

}
@end
